package org.io4j.data;

/**
 * A sink for bytes that can be written to.
 */
public interface ByteSink {

	/**
	 * Writes a byte array to this {@code ByteSink} replacing its current
	 * contents.
	 * 
	 * @param data
	 *           Byte array to write to the {@code ByteSink}
	 * @throws DataTransferException
	 *            if an error occurred during the operation
	 */
	void writeBytes(byte[] data);
}
